package com.sunday.msq.activity;

import java.util.ArrayList;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;

import com.sunday.frame.BaseFragmentActivity;
import com.sunday.frame.LayoutInject;
import com.sunday.frame.ViewInject;
import com.sunday.frame.adapter.ImageAdapter;
import com.sunday.msq.R;
import com.sunday.msq.widget.ActionSheet;
import com.sunday.msq.widget.ActionSheet.ActionSheetListener;

/**
 * 发表提问
 * @author SunshineHu
 *
 */
@LayoutInject(R.layout.question_add_layout)
public class QuestionAddActivity extends BaseFragmentActivity implements OnItemClickListener,ActionSheetListener{

	@ViewInject(value=R.id.gridview,onclick=false)
	private GridView gridview;
	
	@Override
	protected void createActivity() {
		// TODO Auto-generated method stub
		gridview.setAdapter(new ImageAdapter(mActivity, new ArrayList<String>()));
	}

	@Override
	public void onDismiss(ActionSheet actionSheet, boolean isCancel) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onOtherButtonClick(ActionSheet actionSheet, int index) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onItemClick(AdapterView<?> parent, View view, int position,
			long id) {
		// TODO Auto-generated method stub
		setTheme(R.style.ActionSheetStyleIOS7);
		ActionSheet.createBuilder(this, getSupportFragmentManager())
		.setCancelButtonTitle("取消")
		.setOtherButtonTitles("拍照", "从相册选择")
		.setCancelableOnTouchOutside(true).setListener(this).show();
	}

}
